$NG.AllReady(function (page, { useValuesChange,useDataIndexChange,useUpdateRows,useUpdateRow }) {
    const mstform = $NG.getCmpApi("p_form_visit_records")
    if(page.oType =='add'){
        const user = $NG.getUser()
        console.log(user);
        $NG.updateState((updater)=>{
            updater.data.p_form_visit_records.setProps({
                u_visit_psn:{
                    label:user.userName,
                    value:user.userID
                }
            })
        })
    }
    useValuesChange(({args})=>{
        console.log(args);
        $NG.updateState((updater)=>{
            updater.data.p_form_visit_records.setProps({
                u_customer_no:args[0].u_kh.data.CompNo
            })
        })
    },"p_form_visit_records.u_kh")
})